﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Timetable.Base.Entities;
using Ninject;
using Timetable.Base.Interfaces.Repositories;
using Timetable.Base.Interfaces.Validators;

namespace Timetable.Data.Services.DataServices
{
    public class ScheduleService: BaseDataService<Schedule>
    {
        [Inject]
        public IRepository<Schedule> ScheduleRepository { get; set; }

        [Inject]
        public IValidator<Schedule> ScheduleValidator { get; set; }

        public override IRepository<Schedule> Repository
        {
            get { return ScheduleRepository; }
        }

        public override Base.Interfaces.Validators.IValidator<Schedule> Validator
        {
            get { return ScheduleValidator; }
        }

        public override IQueryable<Schedule> All()
        {
            throw new NotSupportedException();
        }

        public override Schedule GetById(int id)
        {
            return Repository.GetById(id);
        }
    }
}
